package Lab3.Rectangle;

/**
 * Title      : CatTest.java
 * Description: This class contains the test class for Cat.
 * Copyright  : Copyright (c) 2006 - 2021
 *
 * @author Yibai Jiang
 * @version 1.0
 */

public class Rectangle {
    int length;
    int width;

    Rectangle(int length, int width) {
        this.length = length;
        this.width = width;
    }


    public int calculateArea() {
        return length * width;
    }

    public int calculateSize() {
        return (length + width) * 2;
    }

    public static void main(String[] args) {
        Rectangle rectangle1 = new Rectangle(8, 6);
        int area1 = rectangle1.calculateArea();
        System.out.println(area1);
        System.out.println("-----------------------------");
        Rectangle rectangle2 = new Rectangle(7, 7);
        int area2 = rectangle2.calculateArea();
        System.out.println(area2);
        System.out.println("-----------------------------");
        int size = rectangle2.calculateSize();
        System.out.println(size);
        System.out.println("-----------------------------");
    }
}
